{layout name="Layout/layout" /}
<style>
    img{width: 200px}
    span{color: #cc181b}
</style>
  <div class="wrapper wrapper-content animated fadeInUp">
      {if condition="isset($has_error) && ($has_error == 1)"}
      <div class="col-sm-12">
          <blockquote class="text-warning" style="font-size:14px">
              <?php
                 $message_decode = json_decode($message,true);
               ?>
              {if condition="is_array($message_decode)"}
                {volist name="message_decode" id="vo"}
                <h4 class="text-danger">{$vo}</h4>
                {/volist}
              {else /}
                <h4 class="text-danger">{$message}</h4>
              {/if}

          </blockquote>
          <hr>
      </div>
      {/if}

      <div class="row text-center">
          <div class="col-sm-12 ">
              <div class="ibox-title">
                  <div style="font-size: 25px">批量添加借款人</div>
              </div>
          </div>
      </div>
      <form action="/merchant/borrower/doAdd" enctype="multipart/form-data" method="post">
      <div class="ibox-content">

          <div class="row" style="padding-top: 7%">
              <div class="col-sm-2">
              </div>
              <div class="col-sm-8">
                  <div class="row panel panel-primary">
                      <div class="col-sm-12 text-center bg-success" style="height: 45px;">
                          <span style="font-size: 25px">添加借款人</span>
                      </div>
                      <div class="panel-body">

                          <div class="row text-center" style="padding-top: 20px">
                              <div class="row text-center" style="padding-top: 20px"></div>
                              <input id="com_file" type="file" name="company_borrower" style="display:none">
                              <div class="row text-center" style="padding-top: 20px"></div>
                              <div class="input-append">
                                  <input id="com_file_cover" class="input-lg " disabled="true" type="text" style="height:30px;border:1px solid #1ab394;">
                                  <button class="btn btn-primary"  type="button" onclick="$('input[id=com_file]').click();">选择Excel</button>
                              </div>

                          </div>
                          <div class="row text-center" style="padding-top: 20px">
                              <a href="\resources\消费贷模板.xlsx">下载消费贷模板</a>|
                              <a href="\resources\车贷模板.xlsx">下载车贷模板</a>|
                              <a href="\resources\企业贷模板.xlsx">下载企业贷模板</a>
                          </div>
                      </div>
                  </div>
              </div>
              <div class="col-sm-2">
              </div>
              <div class="col-sm-1">
              </div>
          </div>


          <div class="row">
              <div class="col-sm-12 text-center">
                  <span style="color:red">*请确保每个字段不为空且真实有效</span>
              </div>
              <div class="row text-center" style="padding-top: 20px"></div>
              <div class="col-sm-12 text-center center-block">
                  <button class="btn btn-info btn-block" type="submit">提交</button>
              </div>
          </div>

      </div>
      </form>
  </div>

<script>
    $('#com_file').change(function(e) {
        $('#com_file_cover').val($(this).val());
    });
</script>

